﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <link href="./common/layui/css/layui.css" rel="stylesheet" />
</head>
<body>

    <script src="./common/layui/layui.js"></script>

    <script>
        layui.use(['element', 'layer'], function () {
            var element = layui.element();
            var layer = layui.layer();

            //监听折叠
            element.on('collapse(test)', function (data) {
                layer.msg('展开状态：' + data.show);
            });
        });
    </script>

</body>
</html>